package com.zhiyou.homework.service.impl;

import com.zhiyou.homework.dao.ExamDao;
import com.zhiyou.homework.pojo.Exam;
import com.zhiyou.homework.service.ExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ExamServiceImpl implements ExamService {

    @Autowired
    private ExamDao examDao;


    @Override
    public List<Exam> findAllByGid(Integer gid) {
        Exam exam = new Exam();
        exam.setGid(gid);
        List<Exam> exams = examDao.select(exam);
        return exams;
    }
}
